
#pragma once

#include "../defines/defines.h"

// 检查 ip
int check_address_and_port(const char * ip, const uint16_t port);

// 连接到对应的服务器ip和端口并返回对应的fd
socket_t connect_to_server(const char * ip, uint16_t port);

// 转换端口
socket_t connect_to_server_char_help(const char * ip, const char * port);

// 
socket_t connect_to_server_int_help(const char * ip, uint16_t port);

struct hostent * gethostbynameinformation(const char * ip);